import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '用户',
    align: "center",
    dataIndex: 'userId_dictText'
  },
  {
    title: '开户名',
    align: "center",
    dataIndex: 'bankHolder'
  },
  {
    title: '银行卡号',
    align: "center",
    dataIndex: 'bankCardNo'
  },
  {
    title: '开户人身份证号',
    align: "center",
    dataIndex: 'bankIdNo'
  },
  {
    title: '开户人手机号',
    align: "center",
    dataIndex: 'bankPhoneNo'
  },
  {
    title: '开户行',
    align: "center",
    dataIndex: 'bankName'
  },
  {
    title: '银行卡种类',
    align: "center",
    dataIndex: 'bankKind'
  },
  {
    title: '银行卡类型',
    align: "center",
    dataIndex: 'bankType'
  },
  {
    title: '银行卡编码',
    align: "center",
    dataIndex: 'bankCode'
  },
  {
    title: '状态',
    align: "center",
    dataIndex: 'status_dictText'
  },
];

//查询数据
export const searchFormSchema: FormSchema[] = [
  {
    label: "用户",
    field: 'userId',
    component: 'JSearchSelect',
    componentProps:{
      dict: "sys_user,realname,id"
    },
    //colProps: {span: 6},
  },
  {
    label: "状态",
    field: 'status',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "row_status"
    },
    //colProps: {span: 6},
  },
];

//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '用户',
    field: 'userId',
    component: 'JSearchSelect',
    componentProps:{
      dict: "sys_user,realname,id"
    },
  },
  {
    label: '开户名',
    field: 'bankHolder',
    component: 'Input',
  },
  {
    label: '银行卡号',
    field: 'bankCardNo',
    component: 'Input',
  },
  {
    label: '开户人身份证号',
    field: 'bankIdNo',
    component: 'Input',
  },
  {
    label: '开户人手机号',
    field: 'bankPhoneNo',
    component: 'Input',
  },
  {
    label: '开户行',
    field: 'bankName',
    component: 'Input',
  },
  {
    label: '银行卡种类',
    field: 'bankKind',
    component: 'Input',
  },
  {
    label: '银行卡类型',
    field: 'bankType',
    component: 'Input',
  },
  {
    label: '银行卡编码',
    field: 'bankCode',
    component: 'Input',
  },
  {
    label: '状态',
    field: 'status',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "row_status"
    },
  },
	// TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];

// 高级查询数据
export const superQuerySchema = {
  userId: {title: '用户',order: 0,view: 'sel_search', type: 'string',dictTable: "sys_user", dictCode: 'id', dictText: 'realname',},
  bankHolder: {title: '开户名',order: 1,view: 'text', type: 'string',},
  bankCardNo: {title: '银行卡号',order: 2,view: 'text', type: 'string',},
  bankIdNo: {title: '开户人身份证号',order: 3,view: 'text', type: 'string',},
  bankPhoneNo: {title: '开户人手机号',order: 4,view: 'text', type: 'string',},
  bankName: {title: '开户行',order: 5,view: 'text', type: 'string',},
  bankKind: {title: '银行卡种类',order: 6,view: 'text', type: 'string',},
  bankType: {title: '银行卡类型',order: 7,view: 'text', type: 'string',},
  bankCode: {title: '银行卡编码',order: 8,view: 'text', type: 'string',},
  status: {title: '状态',order: 9,view: 'list', type: 'string',dictCode: 'row_status',},
};
